package com.p2p.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.p2p.common.DTO.InvestorsDTO;
import com.p2p.common.DTO.InvestorsSelectDTO;
import com.p2p.entity.Investors;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;



@Repository
public interface InvestorsMapper extends BaseMapper<Investors> {


    /**
     * 分页查询投资用户信息
     * @param page
     * @return
     */
    Page<InvestorsDTO> findInvestorsByPage(@Param("page") Page<InvestorsDTO> page);


    int updateInvestorsPwdById(@Param("loginPwd") String loginPwd,
                                      @Param("payPwd") String payPwd,
                                      @Param("id") Long id);

    Page<InvestorsDTO> findInvestorsByCondition(
            @Param("page")Page<InvestorsDTO> page,
            @Param("investorsName")String investorsName,
            @Param("phoneNum")String phoneNum,
            @Param("authenticationStatus")Byte authenticationStatus,
            @Param("lockStatus") Byte lockStatus,
            @Param("userSource") String userSource
            );

    int  deleteLoginDate(@Param("id") Long id);
}
